<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>联动菜单</title>
</head>
<body>
<select name="" id="prov" onclick="ld();">
    <option value="-1">请选择</option>
    <option value="0">北京</option>
    <option value="1">安徽</option>
</select>
<select name="" id="city"></select>
</body>
<script>
    var area = [
        ['朝阳', '海淀', '门头沟'],
        ['淮南', '淮北', '阜阳']
    ]
    function ld() {
        var sel = document.getElementById('prov');
        var opt = '';
        for (var i = 0, len = area[sel.value].length; i < len; i++) {
            opt = opt + '<option value="' + i + '">' + area[sel.value][i] + '</option>';
        }
        document.getElementById('city').innerHTML = opt;
    }
</script>
</html>